<%--
  Created by IntelliJ IDEA.
  User: LeiYu
  Date: 2017/6/23
  Time: 16:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>老张博客前台模版</title>
    <meta name="keywords" content="个人博客">
    <meta name="description" content="个人博客">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, height=device-height, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" type="text/css" href="/assets/layui/css/layui.css">
    <link rel="stylesheet" type="text/css" href="/assets/css/style.css">
    <script type="text/javascript" src="/assets/layui/layui.js"></script>
</head>
<body>
<!-- 头部 开始 -->
<div class="layui-header header trans_3">
    <div class="main index_main">
        <a class="logo" href="/"><img src="/assets/images/logo.png" alt="老张博客前台模版"></a>
        <ul class="layui-nav" lay-filter="top_nav">
            <li class="layui-nav-item home"><a href="/">首页</a></li>
            <li class="layui-nav-item">
                <a href="">学无止境</a>
                <dl class="layui-nav-child"> <!-- 二级菜单 -->
                    <dd><a href="">PHP</a></dd>
                    <dd><a href="">WEB前端</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item">
                <a href="./case_list.html">分享无价</a>
                <dl class="layui-nav-child"> <!-- 二级菜单 -->
                    <dd><a href="./case_list.html">源码分享</a></dd>
                    <dd><a href="./case_list.html">jQuery特效</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item">
                <a href="./diary.html">日记</a>
            </li>
            <li class="layui-nav-item">
                <a href="./about_laozhang.html">关于</a>
                <dl class="layui-nav-child"> <!-- 二级菜单 -->
                    <dd><a href="./about_laozhang.html">关于老张</a></dd>
                    <dd><a href="./about_lzcms.html">关于Lz_CMS</a></dd>
                    <dd><a href="./feedback.html">留言</a></dd>
                </dl>
            </li>
        </ul>
        <div class="title">老张博客前台模版</div>
        <form action="" mothod="post" class="head_search trans_3 layui-form">
            <div class="layui-form-item trans_3">
                <!-- <span class="close trans_3"><i class="layui-icon">&#x1006;</i> </span> -->
                <div class="layui-input-inline trans_3">
                    <select name="model_id trans_3">
                        <option value="1" selected >文章模型</option>
                        <option value="2">图集模型</option>
                    </select>
                </div>
                <input type="text" name="keywords" placeholder="搜索" autocomplete="off" class="search_input trans_3">
                <button class="layui-btn" lay-submit="" style="display: none;"></button>
            </div>

        </form>
    </div>
</div>
<div class="header_back"></div>
<!-- 头部 结束 -->
<!-- 左边导航 开始 -->
<div class="layui-side layui-bg-black left_nav trans_2">
    <div class="layui-side-scroll">
        <ul class="layui-nav layui-nav-tree"  lay-filter="left_nav">
            <li class="layui-nav-item home"><a href="./index.html">首页</a></li>
            <li class="layui-nav-item">
                <a href="javascript:void();">学无止境</a>
                <dl class="layui-nav-child"> <!-- 二级菜单 -->
                    <dd><a href="./article_list.html">PHP</a></dd>
                    <dd><a href="./article_list.html">WEB前端</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:void();">分享无价</a>
                <dl class="layui-nav-child"> <!-- 二级菜单 -->
                    <dd><a href="./case_list.html">源码分享</a></dd>
                    <dd><a href="./case_list.html">jQuery特效</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item">
                <a href="./diary.html">日记</a>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:void();">关于</a>
                <dl class="layui-nav-child"> <!-- 二级菜单 -->
                    <dd><a href="./about_laozhang.html">关于老张</a></dd>
                    <dd><a href="./about_lzcms.html">关于Lz_CMS</a></dd>
                    <dd><a href="./feedback.html">留言</a></dd>
                </dl>
            </li>
        </ul>
    </div>
</div>
<div class="left_nav_mask"></div>
<div class="left_nav_btn"><i class="layui-icon">&#xe602;</i></div>
<!-- 左边导航 结束 -->
<!-- 面包屑导航 开始 -->
<div class="main breadcrumb_nav trans_3">
	<span class="layui-breadcrumb" lay-separator="—">
	  <a href="./index.html">首页</a><a><cite>写博客</cite></a>
	</span>
</div>
<!-- 面包屑导航 结束 -->
<div class="main">
    <div class="page_left">
        <form class="layui-form feedback-form">
            <div class="layui-form-item">
                <label class="layui-form-label">题目:</label>
                <div class="layui-input-block">
                    <input type="text" name="title" required  lay-verify="required" placeholder="请输博客入标题" autocomplete="off" class="layui-input">
                </div>
                <div class="">
                    <textarea name="content" lay-verify="layedit" autocomplete="off" placeholder="输入文章内容" class="llayui-textarea layui-hide" id="content"></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <button class="layui-btn" lay-submit="" lay-filter="feedback">提交</button>
            </div>

        </form>


        <div class="clear"></div>
    </div>
    <script type="text/javascript">
        layui.use(['form', 'layedit'], function(){
            var form = layui.form(),
                layer = layui.layer,
                layedit = layui.layedit,
                $ = layui.jquery;

            //创建一个编辑器
            var content = layedit.build('content',{
                tool: [
                    'strong' //加粗
                    ,'italic' //斜体
                    ,'underline' //下划线
                    ,'del' //删除线
                    ,'|' //分割线
                    ,'left' //左对齐
                    ,'center' //居中对齐
                    ,'right' //右对齐
                    ,'link' //超链接
                    ,'unlink' //清除链接
                    ,'face' //表情
                    ,'image' //插入图片

                ],

                height: 600,

            });
            layedit.set({
                uploadImage: {
                    url: '' //接口url
                    ,type: 'POST' //默认post
                }
            });
//注意：layedit.set 一定要放在 build 前面，否则配置全局接口将无效。
            layedit.build('demo'); //建立编辑器
            //表单验证
            form.verify({
                //编辑器数据同步
                layedit: function(value){
                    layedit.sync(content);
                    if(layedit.getText(content).length < 1){
                        return '至少得 1 个字吧...';
                    }
                }

            });
            //监听提交
            form.on('submit(feedback)', function(data){
                var is_login = false;
                $.post({
                    type:"POST",
                    async:false,  //设置同步请求
                    url:'',
                    dataType:'json',
                    success:function(data) {
                        if(data.code == 200){
                            is_login = true;
                        }
                    }
                });
                return false;
            });

        });
    </script>
    <!-- 底部 开始 -->
    <ul class="layui-fixbar">
        <!-- <li class="layui-icon qr_code">&#xe63b;<img class="qr_code_pic" src="{$settings.qr_code}" alt="微信公众号二维码"></li> -->
        <li class="layui-icon layui-fixbar-top" id="to_top">&#xe604;</li>
    </ul>
    <div class="layui-footer footer">
        <div class="main index_main">
            <p><a href="http://www.phplaozhang.com">老张博客</a> © phplaozhang.com</p>
            <p>
                <a href="">网站地图</a>
            </p>
            <p class="beian">
                <a class="gongan" target="_blank" href=""><img src="./images/gonganbeian.png" alt="豫公网安备 410xxxxxxx号">豫公网安备 410xxxxxxx号</a>
                <a class="icp" target="_blank" href="http://www.miitbeian.gov.cn">豫ICP备xxxxxxxxx号-1</a>
            </p>
        </div>
    </div>
    <!-- 底部 结束 -->
    <script type="text/javascript">
        layui.use(['form','element'], function(){
            var layer = layui.layer,
                form = layui.form(),
                element = layui.element(),
                $ = layui.jquery;

            //左边导航点击显示
            $('.left_nav_btn').click(function(){
                $('.left_nav_mask').show();
                $('.left_nav').addClass('left_nav_show');
            });
            //左边导航点击消失
            $('.left_nav_mask').click(function(){
                $('.left_nav').removeClass('left_nav_show');
                $('.left_nav_mask').hide();
            });

            //搜索框特效
            $('.header .head_search .search_input').focus(function(){
                $('.header .head_search').addClass('focus');
                $(this).attr('placeholder','输入关键词搜索');
            });
            $(document).click(function(){
                $('.header .head_search').removeClass('focus');
                $('.header .head_search .search_input').attr('placeholder','搜索');
            });
            $('.header .head_search').click(function(e){
                $(this).addClass('focus');
                e.stopPropagation();
            });
            /*$('.header .head_search .close').click(function(){
             $('.header .head_search').removeClass('focus');
             $('.header .head_search .search_input').attr('placeholder','搜索');
             });*/

            //回到顶部
            $("#to_top").click(function() {
                $("html,body").animate({scrollTop:0}, 200);
            });
            $(document).scroll(function(){
                var	scroll_top = $(document).scrollTop();
                if(scroll_top > 500){
                    $("#to_top").show();
                }else{
                    $("#to_top").hide();
                }
            });
            //底部版权始终在底部
            /*var win_height = $(window).height();
             var body_height = $('body').height();
             var footer_height = $('.footer').height();
             if(body_height - win_height < 0){
             $('.footer').addClass('footer_fixed');
             } */
        });
    </script>
</body>
</html>
